#
# uCsim doc/Makefile
#
# (c) Drotos Daniel, Talker Bt. 1997
#

STARTYEAR	= 1997

SHELL		= /bin/sh
INSTALL		= @INSTALL@

top_builddir	= @top_builddir@
top_srcdir	= @top_srcdir@

prefix          = @prefix@
exec_prefix     = @exec_prefix@
bindir          = @bindir@
libdir          = @libdir@
datadir         = @datadir@
datarootdir     = @datarootdir@
includedir      = @includedir@
mandir          = @mandir@
man1dir         = $(mandir)/man1
man2dir         = $(mandir)/man2
infodir         = @infodir@
srcdir          = @srcdir@
VPATH           = @srcdir@
#docdir		= $(prefix)/share/doc/ucsim
docdir		= @docdir@/ucsim


# Compiling entire program or any subproject
# ------------------------------------------
all: docs

docs: checkconf

# Compiling and installing everything and running test
# ---------------------------------------------------
install: all installdirs
	cp $(srcdir)/*.html $(DESTDIR)$(docdir)
	cp $(srcdir)/*.svg $(DESTDIR)$(docdir)
	cp $(srcdir)/*.jpg $(DESTDIR)$(docdir)
	cp $(srcdir)/*.png $(DESTDIR)$(docdir)
	cp -R $(srcdir)/stm8 $(DESTDIR)$(docdir)
	cp $(srcdir)/ucsim.1 $(DESTDIR)$(man1dir)
	cp $(srcdir)/serialview.1 $(DESTDIR)$(man1dir)


# Deleting all the installed files
# --------------------------------
uninstall:
	rm -rf $(DESTDIR)$(docdir)
	rm -rf $(DESTDIR)$(man1dir)/ucsim.1
	rm -rf $(DESTDIR)$(man1dir)/serialview.1


# Performing self-test
# --------------------
check:

test baseline:
	@true


# Performing installation test
# ----------------------------
installcheck:


# Creating installation directories
# ---------------------------------
installdirs:
	test -d $(DESTDIR)$(docdir) || $(INSTALL) -d $(DESTDIR)$(docdir)
	test -d $(DESTDIR)$(man1dir) || $(INSTALL) -d $(DESTDIR)$(man1dir)


# Creating dependencies
# ---------------------
include $(srcdir)/clean.mk

# My rules
# --------

# Remaking configuration
# ----------------------
checkconf:
	@if [ -f $(top_builddir)/devel ]; then\
	  $(MAKE) -C $(top_builddir) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
	fi

# End of s51.src/Makefile.in
